﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/MasterPage.master" AutoEventWireup="true"
    CodeFile="Products.aspx.cs" Inherits="Pages_Produse" %>

<%@ Register Src="../WebControls/Product.ascx" TagName="Product" TagPrefix="fns" %>
<%@ Register Namespace="ASPnetControls" Assembly="ASPnetPagerV2_8" TagPrefix="fns" %>
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="center_title_bar">
        Produse
    </div>
    <%--<asp:UpdateProgress ID="ProgressIndicator" runat="server" DisplayAfter="10">
                <ProgressTemplate>
                   
                </ProgressTemplate>
            </asp:UpdateProgress>--%>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:ListView ID="ProductsRepeter" runat="server" >
                <ItemTemplate>
                    <fns:Product ID="Product" runat="server" ProductID='<%#Eval("ID") %>' ProductName='<%#Eval("name") %>'
                        ImageUrl='<%#Eval("image_url") %>' Price='<%#Eval("price") %>' OldPrice='<%#Eval("old_price") %>'
                        Rating='<%#Eval("rating") %>' Views='<%#Eval("views") %>' IsPromotion='<%#Eval("is_promotion") %>' />
                </ItemTemplate>
                <LayoutTemplate>
                    <div id="ProductsDisplayPanel" style="clear: both;">
                        <div style="float: left;" runat="server">
                            <div runat="server" id="itemPlaceholder">
                            </div>
                        </div>
                        <div style="float: right" runat="server">
                            <div class="product_pagination">
                                <asp:DataPager ID="ProductsDataPagerBottom" runat="server" PagedControlID="ProductsRepeter"
                                    PageSize="18">
                                    <Fields>
                                        <asp:NextPreviousPagerField PreviousPageText="«" ShowNextPageButton="False" ButtonCssClass="page_nr" />
                                        <asp:NumericPagerField CurrentPageLabelCssClass="page_nr_selected page_nr" NumericButtonCssClass="page_nr"
                                            NextPreviousButtonCssClass="page_nr" />
                                        <asp:NextPreviousPagerField NextPageText="»" ShowPreviousPageButton="False" ButtonCssClass="page_nr" />
                                    </Fields>
                                </asp:DataPager>
                            </div>
                        </div>
                    </div>
                </LayoutTemplate>
                <EmptyDataTemplate>
                    <center>
                        <span>Nu sa gasit nici un produs</span></center>
                </EmptyDataTemplate>
            </asp:ListView>
        </ContentTemplate>
        <%-- <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Pager" EventName="Command" />
        </Triggers>--%>
    </asp:UpdatePanel>
</asp:Content>

